package packageofjbxq;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import bingliandshuju.SingleDataofAll;
import bingliandshuju.SingleInformationofIllnessDetail;
import com.example.animaldoctor03.*;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;

public class GaiShu extends Activity {
	
	private Button buttonofgsf = null;
	private TextView textofgs = null;
	private String gaishu = null;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.gaishu1);
		
		buttonofgsf = (Button)findViewById(R.id.buttonofgsf);
		textofgs = (TextView)findViewById(R.id.textofgs);
		
		buttonofgsf.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				
				List<Object> listofgsf = new ArrayList <Object>();
				SingleDataofAll SDAofgsf = SingleDataofAll.getInstance();
				listofgsf = SDAofgsf.getListinformation();
				
				Bundle bundleofbyf = new Bundle();
				bundleofbyf.putSerializable("shuju", (Serializable) listofgsf);
				Intent intentofgsf = new Intent(GaiShu.this , AllIllness.class);
				intentofgsf.putExtras(bundleofbyf);
				startActivity(intentofgsf);
				finish();
				
			}
		});
		SingleInformationofIllnessDetail SIIDofgs = SingleInformationofIllnessDetail.getInstance();
		gaishu =	SIIDofgs.getbingyuan();
		Message msgofgs = new Message();
		msgofgs.what = 1;
		handlerofgs.sendMessage(msgofgs);
		
	}
	public Handler handlerofgs = new Handler(){


		public void handleMessage(Message msg) {
			// TODO Auto-generated method stub
		
			if(msg.what == 1){
				
				textofgs.setText("    概述            " + '\n' + '\n' + gaishu);
			}
		}
		
		
	};

}
